<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Acl {

	private $CI;

	public function __construct() {
		$this->CI = &get_instance();
	}

	/**
	 * 权限认证
	 */
	public function is_login() {
		$curUrl=$_SERVER["PHP_SELF"];
		if(preg_match("/admin.*/i", $curUrl))
		{
			verify_admin_login();
			return;
		}
		
		if ($curUrl != "/healthProj/index.php/personal_health_info/get_history" && $curUrl != "/healthProj/index.php" && !preg_match("/login.*/i", $curUrl) && !preg_match("/register.*/i", $curUrl)) {    // 需要进行权限检查的URL
			verify_user_login();
		}
	}
}
?>